// "Copyright [2021] <Copyright Shengkai Lin>"

package cluster.task_scheduler;

import cluster.task_scheduler.task_generator.*;

module TaskScheduler {
    parameters:
        int tmp_tasktype = default(2);
        int maxnumGpus = default(16);
        int maxnumBatches = default(1);
        int modelsize = default(10000000);
        double compute_time = default(0);
        double task_interval = default(0.00005);

        int clustertype = default(0);

    gates:
        output port;

    submodules:
        task_generator : TaskGenerator {
            parameters:
                tmp_tasktype = tmp_tasktype;
                maxnumGpus = maxnumGpus;
                maxnumBatches = maxnumBatches;
                modelsize = modelsize;
                compute_time = compute_time;
                task_interval = task_interval;            
        }

        task_allocator : TaskAllocator {
            parameters:
                clustertype = clustertype;
        }

    connections allowunconnected:
        task_generator.controller_port --> port;
}